﻿using H2.NET.Web.Pages.SMD.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace H2.NET.Web.Pages.SMD
{
    public partial class uc_store_master_data : System.Web.UI.UserControl
    {
        public t_StoreMasterData store
        {
            get
            {
                return ViewState["store"] == null ? new t_StoreMasterData() : (t_StoreMasterData)ViewState["store"];
            }
            set
            {
                ViewState["store"] = value;
            }
        }

        public bool IsCanEditAuthID
        {
            get
            {
                return ViewState["IsCanEditAuthID"] == null ? true : (bool)ViewState["IsCanEditAuthID"];
            }
            set
            {
                ViewState["IsCanEditAuthID"] = value;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (store == null)
                {
                    store = new t_StoreMasterData();
                    search_store.Visible = true;
                }
                else
                {
                    search_store.Visible = false;
                }

                if (!string.IsNullOrEmpty(store.ApplicationType))
                {
                    equipment.Visible = true;
                }
                else
                {
                    equipment.Visible = false;
                }
            }
        }
    }
}